import 'package:json_annotation/json_annotation.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'login_response.g.dart';

@JsonSerializable(explicitToJson: true)
class LoginResponse {
  //旧登录
  LoginBean? DataLine;
  //新登录
  LoginBean? data;

  LoginResponse({this.DataLine,this.data});
  //固定格式
  factory LoginResponse.fromJson(Map<String, dynamic> json) => _$LoginResponseFromJson(json);
  Map<String, dynamic> toJson() => _$LoginResponseToJson(this);
}


@JsonSerializable(explicitToJson: true)
class LoginBean {
  String? userName;  //用户姓名
  String? userStatus;  //认证状态
  String? tokenId;  //登录TokenID
  String? userCode;  //手机账号  即登录账号
  String? userTypeCode;  //用户类型编码  DianZhu 店主 DianZhang 店长 DaoGou 导购PuTong 普通用户
  String? userType;  //用户类型名称
  String? userTypeName;  //用户类型名称
  String? serverAddress;  //零售,出入库等
  String? zuulServerAddress;//订货模块
  String? companyName;
  String? companyCode;

  String? groupName;
  String? brandLogo;

  String? companyId;
  String? groupId;
  String? fid;
  String? sysNo;

  dynamic merchantDeposit;//商户保证金是否启用  merchantDeposit  1是 0否
  dynamic dealerDeposit;//经销商保证金是否启用  dealerDeposit 1是 0否

  //固定格式
  factory LoginBean.fromJson(Map<String, dynamic> json) => _$LoginBeanFromJson(json);
  Map<String, dynamic> toJson() => _$LoginBeanToJson(this);

  LoginBean();
}